Optimal. Leaf size=12 \[ -\frac {\log (a+b \cot (x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3587, 31}
\begin {gather*} -\frac {\log (a+b \cot (x))}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3587
Rubi steps
\begin {align*} \int \frac {\csc ^2(x)}{a+b \cot (x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \cot (x)\right )}{b}\\ &=-\frac {\log (a+b \cot (x))}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 20, normalized size = 1.67 \begin {gather*} \frac {\log (\sin (x))-\log (b \cos (x)+a \sin (x))}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 13, normalized size = 1.08
method | result | size |
derivativedivides | \(-\frac {\ln \left (a +b \cot \left (x \right )\right )}{b}\) | \(13\) |
default | \(-\frac {\ln \left (a +b \cot \left (x \right )\right )}{b}\) | \(13\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right )}{b}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )}{b}\) | \(43\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 12, normalized size = 1.00 \begin {gather*} -\frac {\log \left (b \cot \left (x\right ) + a\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 45 vs.
\(2 (12) = 24\).
time = 3.78, size = 45, normalized size = 3.75 \begin {gather*} -\frac {\log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) - \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right )}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{2}{\left (x \right )}}{a + b \cot {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 22, normalized size = 1.83 \begin {gather*} -\frac {\log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{b} + \frac {\log \left ({\left | \tan \left (x\right ) \right |}\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.18, size = 16, normalized size = 1.33 \begin {gather*} -\frac {2\,\mathrm {atanh}\left (\frac {2\,a\,\mathrm {tan}\left (x\right )}{b}+1\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________